package org.jeecg.modules.zcgl.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zcgl.entity.AssetInfo;
import org.jeecg.modules.zcgl.vo.AssetInfoPage;
import org.jeecg.modules.zcgl.vo.AssetLedgerVo;
import org.jeecg.modules.zcgl.vo.statistical.AssetsParameterVo;
import org.jeecg.modules.zcgl.vo.statistical.AssetsParameterStatisticalVo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 资产信息
 * @Author: jeecg-boot
 * @Date:   2020-06-19
 * @Version: V1.0
 */
public interface IAssetInfoService extends IService<AssetInfo> {

	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(AssetInfoPage assetInfoPage);

//	public void importSaveMain(AssetInfoPage assetInfoPage);

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(AssetInfoPage assetInfoPage, boolean isTask);

	/**
	 * 删除一对多
	 */
	public void delMain (String id);

	/**
	 * 修改资产闲置状态
	 * @param assetIds
	 * @param assetSubIds
	 */
	void updateAssetForRentStatus(String assetIds, String assetSubIds);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 查询台账信息
	 * @param page
	 * @param queryWrapper
	 * @return
	 */
	IPage<AssetLedgerVo> queryAssetLedgerVoList(Page<AssetLedgerVo> page, QueryWrapper<AssetLedgerVo> queryWrapper);
	List<AssetLedgerVo> queryAssetLedgerVoList(QueryWrapper<AssetLedgerVo> queryWrapper);

//	/**
//	 * 根据台账导入信息
//	 * @param vo
//	 * @return
//	 */
//	boolean saveByAssetLedger(AssetLedgerVo vo);

	BigDecimal queryTotalAreaByIds(String ids);

	void checkModel(AssetInfoPage assetInfoPage);

	String getAssetCodeAndCheck(String assetCode, String id, String dictItemValue, String companyId);

	String getAssetCode(String fieldName, String dictItemValue, String code, String companyId);


	/**
	 * 资产台账列表查询--重制版
	 * @param page
	 * @param queryWrapper
	 * @return
	 */
	IPage<AssetsParameterVo> queryAssetsParameterVoList(Page<AssetsParameterVo> page,QueryWrapper<AssetsParameterVo> queryWrapper);

	/**
	 * 资产台账集合查询(导出用)--重制版
	 * @param queryWrapper
	 * @return
	 */
	List<AssetsParameterVo> queryAssetsParameterVoList(QueryWrapper<AssetsParameterVo> queryWrapper);

	/**
	 * 通过合同编号查询
	 * @param contractNum
	 * @return
	 */
	AssetInfo getByContractNum(String contractNum);

	/**
	 * 资产台账汇总
	 * @param page
	 * @param queryWrapper
	 * @return
	 */
	IPage<AssetsParameterStatisticalVo> queryAssetsParameterStatisticalPageList(Page<AssetsParameterStatisticalVo> page, QueryWrapper<AssetsParameterStatisticalVo> queryWrapper);
 }
